package com.sansui.blog.service;

import com.sansui.blog.pojo.UserInfo;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.Map;

/**
 * @name: UserInfoService
 * @author: Sansui
 * @Software: IDEA
 * @Blog: https://www.cnblogs.com/sansui6/
 * @date: 2022-05-06 21:30
 **/

/*
* 用户信息获取 service
* */
public interface UserInfoService {

    /**
     * 根据用户id 获取用户详细信息
     * @param uid
     * @return
     */
    UserInfo getUserInfoByUserId(String uid);

    /**
     * 根据uid保存用户信息
     * @param userInfo
     * @param uid
     * @return
     */
    Map<String, Object> saveUserInfo(UserInfo userInfo,String uid);

    /**
     * 更新头像
     * @param file
     * @param uid
     * @return
     */
    Map<String, Object> uploadAvatars(MultipartFile file, String uid) throws IOException;

}
